import React, { Component, ReactNode, MouseEvent } from "react";

type IProps = {
  emit(e: MouseEvent): void;
  children: ReactNode;
};
export default class Event extends Component<IProps> {
  render() {
    const { children, emit } = this.props;
    return (
      <div>
        <button onClick={emit}>{children}</button>
      </div>
    );
  }
}
